package com.stylefeng.guns.modular.system.model;

import java.io.Serializable;

import org.hibernate.validator.constraints.NotBlank;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;

/**
 * <p>
 * 菜单表
 * </p>
 *
 * @author stylefeng
 * @since 2017-07-11
 */
@TableName("sys_menu")
public class Menu extends Model<Menu> {

	private static final long serialVersionUID = 1L;

	/**
	 * 主键id
	 */
	@TableId(value = "id", type = IdType.AUTO)
	private Long id;
	/**
	 * 菜单编号
	 */
	private String code;
	/**
	 * 菜单父编号
	 */
	private String pcode;
	/**
	 * 当前菜单的所有父菜单编号
	 */
	private String pcodes;
	/**
	 * 菜单名称
	 */
	@NotBlank
	private String name;
	/**
	 * 菜单图标
	 */
	private String icon;
	/**
	 * url地址
	 */
	@NotBlank
	private String url;
	/**
	 * 菜单排序号
	 */
	private Integer num;
	/**
	 * 菜单层级
	 */
	private Integer levels;
	/**
	 * 是否是菜单（1：是 0：不是）
	 */
	private Integer ismenu;
	/**
	 * 备注
	 */
	private String tips;
	/**
	 * 菜单状态 : 1:启用 0:不启用
	 */
	private Integer status;
	/**
	 * 是否打开: 1:打开 0:不打开
	 */
	private Integer isopen;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getPcode() {
		return pcode;
	}

	public void setPcode(String pcode) {
		this.pcode = pcode;
	}

	public String getPcodes() {
		return pcodes;
	}

	public void setPcodes(String pcodes) {
		this.pcodes = pcodes;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getIcon() {
		return icon;
	}

	public void setIcon(String icon) {
		this.icon = icon;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public Integer getNum() {
		return num;
	}

	public void setNum(Integer num) {
		this.num = num;
	}

	public Integer getLevels() {
		return levels;
	}

	public void setLevels(Integer levels) {
		this.levels = levels;
	}

	public Integer getIsmenu() {
		return ismenu;
	}

	public void setIsmenu(Integer ismenu) {
		this.ismenu = ismenu;
	}

	public String getTips() {
		return tips;
	}

	public void setTips(String tips) {
		this.tips = tips;
	}

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public Integer getIsopen() {
		return isopen;
	}

	public void setIsopen(Integer isopen) {
		this.isopen = isopen;
	}

	@Override
	protected Serializable pkVal() {
		return this.id;
	}

	@Override
	public String toString() {
		return "Menu{" + "id=" + id + ", code=" + code + ", pcode=" + pcode + ", pcodes=" + pcodes + ", name=" + name + ", icon=" + icon + ", url=" + url + ", num=" + num + ", levels=" + levels
				+ ", ismenu=" + ismenu + ", tips=" + tips + ", status=" + status + ", isopen=" + isopen + "}";
	}
}
